#ifndef __LOSS_H__
#define __LOSS_H__

void compute_gradient(int N, double *label, double *pred, double *target) {
    for (int i=0; i<N; i++)
        target[i] = label[i] - pred[i]; // gradient of squared-loss w.r.t. each instance
}

#endif		//__LOSS_H__
